function plot_correl(map_file_1, map_file_2, max_ratings, title, x_label, y_label, out_file)
% Actually it probably just works with movies... but formally:
% For map_file_1 = N x 2 file where first column is key and second is data.
% For map_file_2 = M x 2 file where column 2 is data.
% Where N <= M and all keys of map_file_1 are integers in [1,M].
% Plot data from map_file_2 on horizontal and data from map_file_1 on vertical.
% See Makefile for link_counts for an example of map_file_1.
% See netflix/data/num_ratings_per_movie.txt for example of map_file_2.

movie_data = load(map_file_1);
movie_ratings = load(map_file_2);
matched_ratings = movie_ratings(movie_data(:,1),:);
ratings = matched_ratings(:,2);
data = movie_data(:,2);
size(data)
max(data)

figure
plot(ratings, data, 'k.')
axis([0 max_ratings 0 max(data)])
%title(title)
xlabel(x_label)
ylabel(y_label)
set(gcf, 'PaperPositionMode', 'auto', ...
         'Resize', 'off', ...
         'Position', [0 0 600 400]);
print('-deps', ['../' out_file]);

end
